from py2neo import Graph
from config import graph

def clear_graph_database():
    graph = Graph("bolt://localhost:7687", auth=("neo4j", "20021202"))
    # 删除所有节点和关系，此操作不可逆，谨慎使用
    graph.run("MATCH (n) DETACH DELETE n")


if __name__ == "__main__":
    clear_graph_database()